//
//  TimerView.m
//  FindJob
//
//  Created by apple on 16/3/12.
//  Copyright © 2016年 Lee. All rights reserved.
//

#import "TimerView.h"

@interface TimerView ()<TimerViewDelegate>
@property (weak, nonatomic) IBOutlet UIDatePicker *datePickerView;
@property (nonatomic, weak) id<TimerViewDelegate> delegate;
#define kInfoSelectViewHeight 304
@end
@implementation TimerView

- (instancetype)initWithDelegate:(id<TimerViewDelegate>)delegate{
    if (self = [super init]) {
        self = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([TimerView class]) owner:self options:nil][0];
        self.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height - kInfoSelectViewHeight, [UIScreen mainScreen].bounds.size.width, kInfoSelectViewHeight);
        self.delegate = delegate;
    }
    return self;
}

- (IBAction)respondsToBtn:(UIButton *)sender {
    [self removeFromSuperview];
    if ([self.delegate respondsToSelector:@selector(timerView:didSelectedDate:)]) {
        return [self.delegate timerView:self didSelectedDate:self.datePickerView.date];
    }
    
}
- (IBAction)respondsToCancleBtn:(UIButton *)sender {
    [self removeFromSuperview];

}


@end
